#include "cpu/exec/template-start.h"

#define instr lods

make_helper(concat(lods_, SUFFIX)){
	REG(R_EAX) = MEM_R(reg_l(R_ESI),R_DS);
	
	if(cpu.eflags.DF==0)
		cpu.esi = cpu.esi + DATA_BYTE;
	else
		cpu.esi = cpu.esi - DATA_BYTE;//源操作数=源操作数+incdec

	print_asm("lods" str(SUFFIX) " %%ds:(%%esi),%%%s",REG_NAME(R_EAX));
	return 1;
}

#include "cpu/exec/template-end.h"
